/********************************************
* Copyrigt (C) rumi
* Module: serv_pid.h
*********************************************/
#ifndef serv_pid_H
#define serv_pid_H
#include "mcu_config.h"

typedef struct 
{
	int32_t U_kk;    	    // The value of the last output
	int32_t ekk;		 	// The last input deviation
	int32_t ekkk;			// The input deviation of the previous time
	int32_t Ur;				// The limiting output value needs to be initialized
	int32_t Kp;				// proportion
	int32_t Ki;				// integration
	int32_t Kd;				// differential coefficient
	
	uint8_t En;             // Enable
	int16_t Adjust;         // Adjust the value of the PID
	int16_t ValSet;       	// Set value
	int16_t ValNow;       	// Current value

}pid_uint_typedef;


void Serv_PID_Control(pid_uint_typedef *pPIDContrl);


#endif	//serv_pid_H
/********************************************
 * End of file
*********************************************/